package com.gadgets.busi.bm01.fegin;

import com.gadgets.busi.bm01.pojo.CopyTxtTask;
import com.gadgets.framework.common.dto.HttpBaseResp;
import com.gadgets.framework.common.exception.GadgetsServiceException;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * The interface Txt copy controller.
 *
 * @author UncleXiu
 * @version V1.0.0
 * @data 2020 -09-16
 */
@FeignClient(value = "gadgets-config-framework", contextId = "txtCoptController")
@SuppressWarnings("rawtypes")
public interface ITxtCopyController {

    /**
     * 文本拷贝请求（RestFul请求）
     *
     * @throws GadgetsServiceException 异常信息
     */
    @RequestMapping(method = {RequestMethod.POST}, value = "/1024/txtCopy.do")
    void requestTxtCopyForRestful(@RequestParam Map map) throws GadgetsServiceException;

    /**
     * 文本拷贝请求（文本文件请求）
     *
     * @throws GadgetsServiceException 异常信息
     */
    @RequestMapping(method = {RequestMethod.POST}, value = "/1024/txtCopy.do")
    void requestTxtCopyForFile(@RequestParam Map map) throws GadgetsServiceException;

    /**
     * 分页条件查询文本拷贝任务
     * @return                              查询结果
     * @throws GadgetsServiceException      异常信息
     */
    @RequestMapping(method = {RequestMethod.POST}, value = "/txtCopy/selectTxtCopyTask.do")
    public HttpBaseResp<CopyTxtTask> queryTxtCopyByCondition(@RequestParam Map map) throws GadgetsServiceException;

}
